﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestStockReport.aspx.cs" Inherits="Main_Reports_Inventory_TestStockReport" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControl" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../../Styles/accounts.css" rel="stylesheet" type="text/css" />
    <script src="../../../JavaScript/Commons.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
        </asp:ScriptManager>
        <acc:heading ID="pagehead" runat="server" HeadingText="Stock Report" />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <table style="background-color: #EEEEEE; height:30px;">
                <tr>
                    <td>
                        <asp:Label ID="lblRecordNo" runat="server" Width="100px"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblperiod" runat="server"></asp:Label>
                    </td>               
                    <td style="width:7.15%;">
                        From
                    </td>
                    <td style="width:7.15%;">
                        <asp:TextBox ID="txtfromdate" CssClass="input" runat="server" onKeyPress="return isNumberKey(this.id,event);"></asp:TextBox>
                    </td>
                    <td style="width:7.15%;">
                        <asp:ImageButton ID="imgfromdate" runat="server" ImageUrl="~/Images/calendar.gif" />
                        <AjaxControl:CalendarExtender ID="calFrom" runat="server" PopupButtonID="imgfromdate"
                            TargetControlID="txtfromdate">
                        </AjaxControl:CalendarExtender>
                    </td>
                    <td style="width:7.15%;">
                        To
                    </td>
                    <td style="width:7.15%;">
                        <asp:TextBox ID="txttodate" CssClass="input" runat="server" onKeyPress="return isNumberKey(this.id,event);"></asp:TextBox>
                    </td>
                    <td style="width:7.15%;">
                        <asp:ImageButton ID="imgtoDate" runat="server" ImageUrl="~/Images/calendar.gif" />
                        <AjaxControl:CalendarExtender ID="calto" runat="server" PopupButtonID="imgtoDate"
                            TargetControlID="txttodate">
                        </AjaxControl:CalendarExtender>
                    </td>
                    <td style="width:7.15%;">
                        <asp:Button ID="btngetreport" runat="server" Text="Go" CssClass="button1" OnClick="btngetreport_Click"
                            OnClientClick="return getcheck();" />
                        <script type="text/javascript">
                            function getcheck() {
                                if (document.getElementById("txtfromdate").value == '') {
                                    alert("Please Select From Date.");
                                    document.getElementById("txtfromdate").focus();
                                    return false;
                                }
                                else if (document.getElementById("txttodate").value == '') {
                                    alert("Please Select To Date.");
                                    document.getElementById("txttodate").focus();
                                    return false;
                                }
                            }
                        </script>
                    </td>
                    
                </tr>
            </table>
         <asp:GridView ID="grdStockReport" runat="server" AutoGenerateColumns="False" CssClass="gridview"
                AllowPaging="False" EmptyDataText="No Record Found !!" OnPageIndexChanging="grdStockReport_PageIndexChanging"
                Width="100%" OnRowDataBound="grdStockReport_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderText="S.No." ItemStyle-Width="1.5%">
                        <ItemTemplate>
                            <%# Container.DataItemIndex + 1 %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Item Code" ItemStyle-Width="7.5%">
                        <ItemTemplate>
                            <asp:Label ID="lblItemCode" runat="server" Text='<%# Bind("ItemCode") %>'></asp:Label>
                        </ItemTemplate>                                  
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Item Name" ItemStyle-Width="13.5%">
                        <ItemTemplate>
                            <asp:Label ID="lblitemname" runat="server" Text='<%# Bind("ItemName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField> 
                    <asp:TemplateField HeaderText="Single Value" ItemStyle-HorizontalAlign="Right"
                        ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblopeningasdQty" runat="server" Text='<%#Bind("SingleValue")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>                  
                    <asp:TemplateField HeaderText="Opening Balance Qty" ItemStyle-HorizontalAlign="Right"
                        ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblopeningQty" runat="server" Text='<%#Bind("OpeningBalQty")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Opening Balance Value" ItemStyle-HorizontalAlign="Right"
                        ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblopeningvalue" runat="server" Text='<%#Bind("OpeningBalValue")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Purchase Qty" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblPurchaseQty" runat="server" Text='<%#Bind("PurchaseQty") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Purchase Value" ItemStyle-HorizontalAlign="Right"
                        ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblPurchaseValue" runat="server" Text='<%#Bind("PurchaseValue")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Issue Qty" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblIssueqty" runat="server" Text='<%#Bind("IssueQty")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Issue Value" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblissueValue" runat="server" Text='<%#Bind("IssueValue")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Clossing Qty" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblclossingqty" runat="server" Text='<%#Bind("ClosingQty")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Clossing Value" ItemStyle-HorizontalAlign="Right"
                        ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblclossingvalue" runat="server" Text='<%#Bind("ClosingValue")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Landed Cost" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lbllandedcost" runat="server" Text='<%#Bind("LandedCost")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Inventory Class" ItemStyle-Width="3.33%">
                        <ItemTemplate>
                            <asp:Label ID="lblInventoryClass" runat="server" Text='<%#Bind("InventoryClass")%>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
    </div>
    </form>
</body>
</html>
